﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the GNU General Public License version 2 (GPLv2).
// See accompanying file License.txt or copy at http://phuse.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Phuse.Net.Forums
{
    using System;
    using System.IO;
    using System.Runtime.Serialization;

    /// <summary>The exception that is thrown when a connection has been lost.</summary>
    /// <threadsafety static="true" instance="false"/>
#if !WINDOWS_PHONE
    [Serializable]
#endif
    public sealed class ConnectionLostException : IOException
    {
        /// <summary>Initializes a new instance of the <see cref="ConnectionLostException"/> class.</summary>
        public ConnectionLostException() : this(null, null)
        {
        }

        /// <summary>Initializes a new instance of the <see cref="ConnectionLostException"/> class.</summary>
        public ConnectionLostException(string message) : this(message, null)
        {
        }

        /// <summary>Initializes a new instance of the <see cref="ConnectionLostException"/> class.</summary>
        public ConnectionLostException(string message, Exception innerException) : base(message, innerException)
        {
        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#if !WINDOWS_PHONE
        /// <summary>Initializes a new instance of the <see cref="ConnectionLostException"/> class.</summary>
        private ConnectionLostException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
#endif
    }
}
